import os
import threading
import time
import random

ips = []


def ping1(start, end):
    lan1 = (range(start, end))
    for ip in lan1:
        ip1 = '202.96.20.%s' % ip
        ips.append(ip1)
        print(ip1)


ping1(100, 200)

# def ping2(start, end):
#     lan2 = (range(start, end))
#     print("add2")
#     for ip in lan2:
#         ips = '202.96.209.%s' % ip
#         cmd = 'ping -c 1 %s' % ips
#         os.system(cmd)
#

add1 = threading.Thread(target=ping1(1, 4))
add2 = threading.Thread(target=ping1(5, 8))
add3 = threading.Thread(target=ping1(9, 12))
add4 = threading.Thread(target=ping1(189, 254))
# add1 = threading.Thread(target=ping2(3, 4))
add1.start()
add2.start()
add3.start()
add4.start()
